package com.yituo.gate


import com.yituo.gate.filter.RequestTimeGatewayFilterFactory
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.cloud.netflix.eureka.EnableEurekaClient
import org.springframework.context.annotation.Bean

@SpringBootApplication
@EnableEurekaClient
open class GatewayApplication {

    @Bean
    open fun requestTimeGatewayFilterFactory(): RequestTimeGatewayFilterFactory {
        return RequestTimeGatewayFilterFactory()
    }

    companion object {

        @JvmStatic
        fun main(args: Array<String>) {
            SpringApplication.run(GatewayApplication::class.java, *args)
        }
    }
}
